package com.it.cn.p1_HomeWork;

public class Rectangle {
    private int length;
    private int width;

    public void getArea() {
        System.out.println("长为:"+length+", 宽为: "+width+" 的矩形的面积为:"+length * width);
    }
    public void getSize() {
        System.out.println("长为:"+length+", 宽为: "+width+" 的矩形的周长为:"+(length + width) *2);
    }

    public int getLength() {
        return length;
    }

    public void setLength(int length) {
        this.length = length;
    }

    public int getWidth() {
        return width;
    }

    public void setWidth(int width) {
        this.width = width;
    }

    public Rectangle() {
    }

    public Rectangle(int length, int width) {
        this.length = length;
        this.width = width;
    }
}
